package org.example.config;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
public class OpenAiConfig {

    private String apiKey;
    private String baseUrl;


    public String getApiKey() {
        return apiKey;
    }

    @Value("${langchain4j.open-ai.chat-model.api-key}")
    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }

    public String getBaseUrl() {
        return baseUrl;
    }

    @Value("${langchain4j.open-ai.chat-model.base-url}")
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }


    @Override
    public String toString() {
        return "OpenAiConfig{" +
                "apiKey='" + apiKey + '\'' +
                ", baseUrl='" + baseUrl + '\'' +
                '}';
    }
}
